<template>
  <view class="transport flexc">
    <view class="header">
      <u-tabs
        :current="tabCurrent"
        :scrollable="true"
        :list="tabList"
        keyName="title"
        lineColor="#CB0011"
        :lineWidth="28"
        :lineHeight="2"
        @click="tabClick"
        :itemStyle="{
          height: '88rpx',
          fontSize: '28rpx',
          color: '#9695A3',
        }"
        :activeStyle="{ fontWeight: 'bold', color: '#000000' }"
        :inactiveStyle="{}"></u-tabs>
    </view>
    <!-- 中间数据展示 发起提交-->
    <template v-if="tabCurrent == 0 || tabCurrent == 2">
      <!-- 二级tab -->
      <view class="nav flex-center">
        <view :class="navIndex == 1 ? 'nav-ac' : ''" @click="navBtn(1)">
          白条数据统计
        </view>
        <view :class="navIndex == 2 ? 'nav-ac' : ''" @click="navBtn(2)">
          抓鸭副品统计
        </view>
      </view>
      <template v-if="tabCurrent == 0">
        <view class="flex1 over" style="padding-bottom: 50upx">
          <u-calendar
            @close="() => (showProductionDate = false)"
            @confirm="
              (val) => {
                topFormObj.production_date = val[0];
                showProductionDate = false;
              }
            "
            :maxDate="maxDate"
            :minDate="minDate"
            :default-date="defaultDate"
            :month-num="12"
            color="#DA4334"
            :show="showProductionDate"></u-calendar>
          <view @click="showProductionDateFn" class="wrap mb16">
            <view class="box">
              <view class="">
                <text class="sc">*</text>
                生产日期
              </view>
              <view class="box-b flex">
                <input
                  class="flex1"
                  type="text"
                  v-model="topFormObj.production_date"
                  disabled
                  placeholder="默认选择当天" />
                <image
                  src="/static/login/pop-arrow.png"
                  mode="aspectFit"></image>
              </view>
            </view>
          </view>
          <view class="wrap mb16">
            <view class="box">
              <view class="">
                <text class="sc">*</text>
                第几车/次
              </view>
              <input
                class="flex1"
                type="text"
                v-model="topFormObj.train_number"
                placeholder="请输入" />
            </view>
          </view>
          <view class="mb16" v-for="(item, index) in computedList" :key="index">
            <view class="tip flex-between">
              <view class="">录入明细{{ index + 1 }}</view>
              <view class="del" v-if="!item.disabled" @click="delList(index)">
                删除
              </view>
            </view>
            <view class="wrap">
              <view class="box flexc">
                <view class="">序号</view>
                <input
                  class="flex1"
                  type="text"
                  v-model="item.production_section_one_no"
                  placeholder="请输入 不输入自动生成" />
              </view>
              <view @click="goyzh(index)" class="box flexc">
                <view class="">
                  <text class="sc">*</text>
                  养殖户
                </view>
                <view class="box-b flex">
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.farmer_title"
                    disabled
                    placeholder="请选择" />
                  <image
                    src="/static/login/pop-arrow.png"
                    mode="aspectFit"></image>
                </view>
              </view>
              <view class="box flexc">
                <view class="">地点</view>
                <input
                  class="flex1"
                  v-model="item.address"
                  type="text"
                  disabled
                  placeholder="请选择" />
              </view>
              <view class="box flexc">
                <view class="">批次</view>
                <view class="box-b flex">
                  <input
                    class="flex1"
                    type="text"
                    disabled
                    v-model="item.batch_title"
                    placeholder="请选择" />
                  <!-- <image
										src="/static/login/pop-arrow.png"
										mode="aspectFit"></image> -->
                </view>
              </view>
              <view class="box flexc" @click="showPop(index, 4)">
                <view class="">车牌号</view>
                <view class="box-b flex">
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.plate_number"
                    disabled
                    placeholder="请选择" />
                  <image
                    src="/static/login/pop-arrow.png"
                    mode="aspectFit"></image>
                </view>
              </view>
              <!-- 副品数据 -->
              <template v-if="navIndex == 2">
                <view class="box flexc">
                  <view class="">
                    <text class="sc">*</text>
                    抓伤只数
                  </view>
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.scratch_num"
                    placeholder="请输入" />
                </view>
                <view class="box flexc">
                  <view class="">斑疮</view>
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.macular_ulcer"
                    placeholder="请输入" />
                </view>
                <view class="box flexc">
                  <view class="">断翅</view>
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.broken_wing"
                    placeholder="请输入" />
                </view>
                <view class="box flexc">
                  <view class="">断掌</view>
                  <input
                    class="flex1"
                    v-model="item.palm"
                    type="text"
                    placeholder="请输入" />
                </view>
                <view class="box flexc">
                  <view class="">红头</view>
                  <input
                    class="flex1"
                    v-model="item.red_head"
                    type="text"
                    placeholder="请输入" />
                </view>
              </template>
              <!-- 白条数据 -->
              <template v-else>
                <view class="box flexc">
                  <view class="">驾驶员</view>
                  <input
                    class="flex1"
                    v-model="item.driver"
                    type="text"
                    disabled
                    placeholder="请输入" />
                </view>
                <view class="box flexc">
                  <view class="">
                    <text class="sc">*</text>
                    胴体重量(kg)
                  </view>
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.ketone_body_weight"
                    placeholder="请输入" />
                </view>
                <view class="box flexc">
                  <view class="">
                    <text class="sc">*</text>
                    生产只数
                  </view>
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.production_num"
                    placeholder="请输入" />
                </view>
                <view class="box flexc">
                  <view class="">残鸭只数</view>
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.residual_duck"
                    placeholder="请输入" />
                </view>
                <view class="box flexc">
                  <view class="">残鸭重量(kg)</view>
                  <input
                    class="flex1"
                    type="text"
                    v-model="item.residual_weight"
                    placeholder="请输入" />
                </view>
              </template>
              <view
                @click="addListForm"
                v-if="index == computedList.length - 1"
                class="flex-center add-icon">
                <image src="/static/order/add.png" mode="aspectFit"></image>
              </view>
            </view>
          </view>

          <view class="wrap mb16">
            <view class="box flexc">
              <view class="">备注</view>
              <view class="" style="height: 400upx">
                <u--textarea
                  v-model="topFormObj.info"
                  border="none"
                  style="height: 100%"
                  height="200"
                  maxlength="200"
                  placeholder="请输入备注信息"
                  count></u--textarea>
              </view>
            </view>
          </view>
          <record_status_userVue :formType="navIndex + 4" />
        </view>
        <view class="footer flex-between">
          <view class="box-icon column-flex-center" @click="submitForm(1)">
            <image src="/static/order/5.png" mode="aspectFit"></image>
            <view class="">存草稿</view>
          </view>
          <view @click.stop="submitForm(0)" class="btn">提交</view>
        </view>
      </template>
      <template v-else>
        <view class="search flex">
          <image src="/static/order/search.png" mode="aspectFit"></image>
          <input
            type="text"
            confirm-type="search"
            v-model="viewDataObj.keyWord"
            class="flex1"
            placeholder="搜索"
            @confirm="searchBtn" />
        </view>
        <view class="flex1 over" style="padding-bottom: 50upx">
          <!-- 白条 -->
          <scroll-view
            v-if="navIndex == 1"
            scroll-y="true"
            style="height: 100%"
            @scrolltolower="loadMore">
            <view class="content-wrap">
              <view
                class="content-box"
                v-for="(item, index) in orders"
                :key="index"
                @click="goDetail(item)">
                <view class="flex-between mb12">
                  <view class="flex">
                    <view :class="['t', item.status == 9 ? 'ac4' : '']">
                      {{ item.title }}
                    </view>
                    <view class="edit-text" v-if="item.pid > 0">修改</view>
                  </view>
                  <view class="t1">
                    {{ item.created_at }}
                  </view>
                </view>
                <view class="t2">生产日期：{{ item.production_date }}</view>
                <view class="t2">车次：{{ item.train_number }}</view>
                <view class="no flex-between">
                  <view class="">
                    序号：{{ item.production_section_one_no || "" }}
                  </view>
                  <view
                    class="cred"
                    v-if="item.pid > 0"
                    @click.stop="historyBtn(item)">
                    历史数据
                  </view>
                </view>

                <view class="flex-between mt34">
                  <view class="flex">
                    <image
                      class="img"
                      v-if="item.status != 9"
                      src="/static/order/3.png"
                      mode="aspectFit"></image>
                    <image
                      class="img"
                      v-if="item.status == 9"
                      src="/static/order/4.png"
                      mode="aspectFit"></image>
                    <text
                      :class="
                        item.status == 3
                          ? 'ac1'
                          : item.status == 9
                          ? 'ac4'
                          : 'ac'
                      ">
                      {{ item.user_name }}
                    </text>
                  </view>
                  <view
                    :class="
                      item.status == 1 ||
                      item.status == 2 ||
                      item.status == 4 ||
                      item.status == 6
                        ? 'ac2'
                        : item.status == 2
                        ? 'ac3'
                        : 'ac4'
                    ">
                    {{ item.status_name }}
                  </view>
                </view>
              </view>
            </view>
            <w_loadmore :status="loadStatus"></w_loadmore>
          </scroll-view>
          <!-- 抓鸭 -->
          <scroll-view
            v-else
            scroll-y="true"
            style="height: 100%"
            @scrolltolower="loadMore">
            <view class="content-wrap">
              <view
                class="content-box"
                v-for="(item, index) in orders"
                :key="index"
                @click="goDetail(item)">
                <view class="flex-between mb12">
                  <view class="flex">
                    <view :class="['t', item.status == 9 ? 'ac4' : '']">
                      {{ item.title }}
                    </view>
                    <view class="edit-text" v-if="item.pid > 0">修改</view>
                  </view>
                  <view class="t1">
                    {{ item.created_at }}
                  </view>
                </view>
                <view class="no flex-between">
                  <view class="">
                    序号：{{ item.production_section_one_sideline_no || "" }}
                  </view>
                  <view
                    class="cred"
                    v-if="item.pid > 0"
                    @click.stop="historyBtn(item)">
                    历史数据
                  </view>
                </view>
                <view class="t2 mb12">车号：{{ item.train_number }}</view>
                <view class="flex-between mt34">
                  <view class="flex">
                    <image
                      v-if="item.status != 9"
                      class="img"
                      src="/static/order/3.png"
                      mode="aspectFit"></image>
                    <image
                      class="img"
                      src="/static/order/4.png"
                      v-if="item.status == 9"
                      mode="aspectFit"></image>
                    <text
                      :class="
                        item.status == 3
                          ? 'ac1'
                          : item.status == 9
                          ? 'ac4'
                          : 'ac'
                      ">
                      {{ item.user_name }}
                    </text>
                  </view>
                  <view
                    :class="
                      item.status == 1 ||
                      item.status == 2 ||
                      item.status == 4 ||
                      item.status == 6
                        ? 'ac2'
                        : item.status == 8
                        ? 'ac3'
                        : 'ac4'
                    ">
                    {{ item.status_name }}
                  </view>
                </view>
              </view>
            </view>
            <w_loadmore :status="loadStatus"></w_loadmore>
          </scroll-view>
        </view>
      </template>
    </template>
    <!-- 查看报表 -->
    <template v-if="tabCurrent == 1">
      <view class="nav1 flex-between">
        <view class="flex" @click="() => (btShow = true)">
          <view class="">
            {{ btIndex === 1 ? "白条数据统计" : "抓鸭副品统计" }}
          </view>
          <image
            src="/static/order/d.png"
            class="d-icon"
            mode="aspectFit"></image>
        </view>
        <view class="flex" @click="exportInfo">
          <image
            src="/static/order/e.png"
            mode="aspectFit"
            class="e-icon"></image>
          <view class="nav1-text">导出</view>
        </view>
      </view>
      <view @click="showTime = true" class="time-box">
        <view class="flex">
          <view class="">选择时间</view>
          <image
            src="/static/order/d.png"
            mode="aspectFit"
            class="d1-icon"></image>
        </view>
        <view class="time-box-text">
          {{ topTime }}
        </view>
      </view>
      <view class="flex1 over wrap1" style="padding-bottom: 50upx">
        <view class="">表单提交次数</view>
        <view class="wrap1-num">{{ total || 0 }}</view>
        <view class="wrap1-des">数据统计明细</view>
        <view class="flex-between wrap1-tip">
          <view @click="productDateDialog = true" class="flex-center">
            <text>生产日期：</text>
            <text>
              {{ viewInfoQueryObj.production_date || "请选择" }}
            </text>
            <image src="/static/order/d.png" mode="aspectFit" class="d"></image>
          </view>
          <view class="flex-center" @click="showPop(0, 3)">
            <text>第</text>
            <view class="wrap1-text">
              {{ viewInfoQueryObj.train_number }}
            </view>
            <text>车次</text>
            <image src="/static/order/d.png" mode="aspectFit" class="d"></image>
          </view>
          <view @click="goyzh1" class="flex-center">
            <text>养殖户：</text>
            <text>
              {{ viewInfoQueryObj.farmer_title || "请选择" }}
            </text>
            <image src="/static/order/d.png" mode="aspectFit" class="d"></image>
          </view>
        </view>
        <view>
          <zb-table
            :show-header="true"
            :columns="column"
            :border="true"
            :flt="true"
            :cell-style="cellStyle"
            :cell-header-style="cellHeaderStyle"
            :data="tableData"></zb-table>
          <view class="page-set bt15">
            <uni-pagination
              title="标题文字"
              :current="viewInfoQueryObj.page"
              @change="pageBtn"
              :total="total"></uni-pagination>
          </view>
        </view>
      </view>
      <!-- 白条统计的弹框 -->
      <u-popup :show="btShow">
        <view class="popup-bt">
          <view
            :class="btIndex == 1 ? 'bt-ac popup-bt-b' : 'popup-bt-b'"
            @click="btCheck(1)">
            白条数据统计
          </view>
          <view
            :class="btIndex == 2 ? 'bt-ac popup-bt-b16' : 'popup-bt-b16'"
            @click="btCheck(2)">
            抓鸭副品统计
          </view>
          <view class="" @click="() => (btShow = false)">取消</view>
        </view>
      </u-popup>
      <!-- 日历弹框 -->
      <pop_time
        @confirmDate="confirm"
        @tiemCheck="tiemCheck"
        @closeTime="showTime = false"
        :showTime="showTime"
        :mode="mode" />
    </template>
    <!-- 生产日期 -->
    <u-calendar
      color="#DA4334"
      @confirm="
        (val) => {
          viewInfoQueryObj.production_date = val[0];
          productDateDialog = false;
          getStateMentInfo();
        }
      "
      @close="productDateDialog = false"
      :show="productDateDialog"
      :maxDate="maxDate"
      :minDate="minDate"
      :default-date="defaultDate"
      :month-num="12"
      mode="single"></u-calendar>
    <!-- 养殖户 -->
    <u-picker
      @cancel="() => (frameShow = false)"
      @confirm="chooseFrame"
      :show="frameShow"
      confirmColor="#DA4334"
      :columns="farmerList"
      keyName="title"></u-picker>
    <!-- 车次 -->
    <u-picker
      @cancel="() => (frameShow1 = false)"
      @confirm="chooseFrame"
      :show="frameShow1"
      confirmColor="#DA4334"
      :columns="numList"
      keyName="title"></u-picker>
    <!-- 车牌号键盘 -->
    <u-keyboard
      ref="uKeyboard"
      @change="cartChange"
      @backspace="cartBack"
      mode="car"
      @confirm="() => (showCar = false)"
      @cancel="() => (showCar = false)"
      :show="showCar"></u-keyboard>
    <!-- 时间选择弹框 -->
    <u-datetime-picker
      :show="showTime1"
      v-model="timeVal"
      title="到达基地时间"
      cancelColor="#DA4334"
      confirmColor="#DA4334"
      @confirm="timeBtn"
      @cancel="() => (showTime1 = false)"
      mode="time"></u-datetime-picker>
  </view>
</template>

<script>
const d = new Date();
const year = d.getFullYear();
let month = d.getMonth() + 1;
month = month < 10 ? `0${month}` : month;
const date = d.getDate() < 10 ? `0${d.getDate()}` : d.getDate();
const maxDate = new Date(year + 1, 0, 0).getTime();
const minDate = new Date(year, 0, 1).getTime();
const defaultDate = [`${year}-${month}-${date}`];
const monthNum = (year - 2022 + 1) * 12;
import w_loadmoreVue from "../../../components/w_loadmore/w_loadmore.vue";
import log from "../../../plugin/log";
import utils from "../../../plugin/util.js";
import record_status_userVue from "../../../components/order/record_status_user.vue";
import pop_time from "../../../components/order/pop_time.vue";
export default {
  components: { record_status_userVue, pop_time, w_loadmoreVue },
  data() {
    return {
      monthNum,
      maxDate,
      minDate,
      defaultDate,
      loadStatus: "loadmore",
      list: [],
      whiteObj: {
        // 白条
        production_section_one_no: "",
        farmer_id: "",
        farmer_title: "",
        address: "",
        plate_number: "",
        driver: "",
        ketone_body_weight: "",
        production_num: "",
        residual_duck: "",
        residual_weight: "",
      },
      list: [
        {
          // 白条
          production_section_one_no: "",
          farmer_id: "",
          farmer_title: "",
          address: "",
          plate_number: "",
          driver: "",
          ketone_body_weight: "",
          production_num: "",
          residual_duck: "",
          residual_weight: "",
          disabled: true,
          batch_title: "",
          batch: "",
        },
      ],
      list1: [
        {
          // 抓鸭
          production_section_one_no: "",
          farmer_id: "",
          farmer_title: "",
          address: "",
          plate_number: "",
          scratch_num: "",
          macular_ulcer: "",
          broken_wing: "",
          palm: "",
          red_head: "",
          disabled: true,
          batch_title: "",
          batch: "",
        },
      ],
      workshop: {
        // 抓鸭
        production_section_one_no: "",
        farmer_id: "",
        farmer_title: "",
        address: "",
        plate_number: "",
        scratch_num: "",
        macular_ulcer: "",
        broken_wing: "",
        palm: "",
        red_head: "",
      },
      topFormObj: {
        production_date: "", // 生产日期
        train_number: "", // 车次
        info: "", // 备注
      },
      viewInfoQueryObj: {
        start_time: `${new Date().getFullYear()}` + "-" + "01-01",
        end_time: `${new Date().getFullYear()}` + "-" + "12-12",
        type: 8,
        page: 1,
        limit: 10,
        train_number: "",
        production_date: "",
        farmer_title: "",
        farmer_id: "",
      },
      frameShow: false,
      farmerList: [],
      showProductionDate: false,
      productDateDialog: false,
      btIndex: 1,
      btShow: false, //查看数据的第一个选择框
      showTime1: false,
      timeVal: "",
      showCar: false,
      tabCurrent: 0,
      tabList: [
        { title: "发起提交", value: 0 },
        { title: "查看报表", value: 1 },
        { title: "查看数据", value: 2 },
      ],
      navIndex: 1,
      column: [],
      tableData: [],
      total: 0,
      showTime: false, //时间弹框
      mode: "range",
      orders: [],
      addList: [],
      commonIndex: 0,
      topTime:
        utils.timeFormat(
          new Date(`${new Date().getFullYear()}` + "-" + "01-01")
        ) +
        "-" +
        utils.timeFormat(
          new Date(`${new Date().getFullYear()}` + "-" + "12-31")
        ),
      viewDataObj: {
        page: 1,
        limit: 10,
        keyword: "",
      },
      numList: [],
      nomore: false,
      frameShow1: false,
      saveIndex: 0,
      farmerList0: [],
      farmerList1: [],
      farmerList2: [], //报表中的养殖户类型
      farmerList4: [], //车牌号
      farmerList12: {},
      info1: "",
      info2: "",
      isDetail: false,
      statusMap: [],
    };
  },
  onShow() {
    //   if (uni.getStorageSync("checkAddress")) {
    //     if (this.navIndex == 1) {
    //       this.list[this.commonIndex].address = JSON.parse(
    //         uni.getStorageSync("checkAddress")
    //       )?.address;
    //     } else {
    //       this.list1[this.commonIndex].address = JSON.parse(
    //         uni.getStorageSync("checkAddress")
    //       )?.address;
    //     }
    //     uni.removeStorageSync("checkAddress");
    //   }
    if (this.isDetail) {
      this.page = 1;
      this.nomore = false;
      this.getViewData();
      this.isDetail = false;
    }
    //养殖户返回，赋值
    if (uni.getStorageSync("checkAddress")) {
      const obj = JSON.parse(uni.getStorageSync("checkAddress"));
      if (this.tabCurrent == 0) {
        if (this.navIndex == 1) {
          this.list[this.commonIndex].farmer_id = obj.farmer_id;
          this.list[this.commonIndex].farmer_title = obj.title;
          this.list[this.commonIndex].address = obj.address;
        } else {
          this.list1[this.commonIndex].farmer_id = obj.farmer_id;
          this.list1[this.commonIndex].farmer_title = obj.title;
          this.list1[this.commonIndex].address = obj.address;
        }
        this.getBatch(obj.farmer_id);
      } else {
        //养殖户
        this.viewInfoQueryObj.farmer_id = obj.value;
        this.viewInfoQueryObj.farmer_title = obj.title;

        if (this.btIndex == 1) {
          //白条数据统计
          this.getWhiteStateInfo();
        } else {
          //抓鸭副品
          this.getWorkShopInfo();
        }
      }
      //this.isyzh = false
      uni.removeStorageSync("checkAddress");
    }
  },
  created() {
    //this.getFarmer();
    // this.getBatch();
    this.getDetail();
    this.getDetail1();
    this.getCartNum();
    this.getPlanNum();
    //this.getStatus();
  },
  computed: {
    computedList() {
      return this.navIndex == 1 ? this.list : this.list1;
    },
  },
  methods: {
    showProductionDateFn() {
      this.showProductionDate = true;
    },
    goyzh1() {
      this.toRoute("/select-address?isyzh=2&num=" + this.navIndex);
    },
    goyzh(k) {
      this.commonIndex = k;
      //this.isyzh = true
      this.toRoute("/select-address?isyzh=1");
    },
    //报表审核权限映射
    getStatus() {
      this.$api({
        url: "/getStatusMap",
        method: "get",
        data: {},
      }).then((res) => {
        if (res.code === 200) {
          this.statusMap = res.data;
        }
      });
    },
    //报表中的养殖户数据
    getFarmer1() {
      this.farmerList2 = [];
      this.$api({
        url: "/getFarmer",
        method: "get",
        data: { type: this.navIndex },
      }).then((res) => {
        if (res.code == 200) {
          this.farmerList2.push(res.data);
        }
      });
    },
    cellStyle({ row, column, rowIndex, columnIndex }) {
      if (columnIndex == 0) {
        return {
          color: "#DA4334",
          fontSize: "24rpx",
        };
      }
      if (columnIndex === 9) {
        if (row.status_text.indexOf("失败") > -1) {
          return {
            color: "#DA4334",
            fontSize: "24rpx",
          };
        }
        if (row.status_text === "已撤销") {
          return {
            color: "#8d8d8d",
            fontSize: "24rpx",
          };
        }
      }
      return {
        color: "#171717",
        fontSize: "24rpx",
      };
    },
    cellHeaderStyle() {
      return {
        backgroundColor: "#F6F1F1",
        color: "#707072",
        fontSize: "24rpx",
      };
    },
    //点击历史数据
    historyBtn(item) {
      this.toRoute({
        path: "section-detail",
        query: {
          id: item.pid,
          type: item.type, //1--放苗 2--养殖
        },
      });
    },
    showPop(index, k) {
      if (k == 3) {
        //报表中的车次
        this.frameShow1 = true;
        this.saveIndex = k;
        return;
      }
      this.frameShow = true;
      this.commonIndex = index;
      this.saveIndex = k;
      this.farmerList = this["farmerList" + k];
    },
    //获取批次
    getBatch(farmer_id) {
      // this.farmerList1 = [];
      this.$api({
        url: "/batch_list",
        method: "get",
        data: { farmer_id },
      }).then((res) => {
        if (res.code === 200) {
          // res.data.forEach((item) => {
          // 	item.title = item.batch;
          // });
          // this.farmerList1.push(res.data);
          if (this.navIndex == 1) {
            this.list[this.commonIndex].batch =
              res.data.length > 0 ? res.data[0].batch : "";
            this.list[this.commonIndex].batch_title =
              res.data.length > 0 ? res.data[0].batch : "";
          } else {
            this.list1[this.commonIndex].batch =
              res.data.length > 0 ? res.data[0].batch : "";
            this.list1[this.commonIndex].batch_title =
              res.data.length > 0 ? res.data[0].batch : "";
          }
        }
      });
    },
    searchBtn() {
      this.page = 1;
      this.nomore = false;
      this.getViewData();
    },
    //获取车次
    getCartNum() {
      this.$api({
        url: "/getTrainNumber",
        method: "get",
        data: {
          type: this.btIndex == 1 ? "2" : "1",
        },
      }).then((res) => {
        if (res.code === 200 && res.data.length > 0) {
          res.data.forEach((item) => {
            item.title = item.train_number;
          });
          this.numList.push(res.data);
        }
      });
    },
    delList(k) {
      if (this.navIndex == 1) {
        this.list.splice(k, 1);
      } else {
        this.list1.splice(k, 1);
      }
    },
    addListForm() {
      if (this.navIndex == 1) {
        this.list.push({
          // 白条
          production_section_one_no: "",
          farmer_id: "",
          farmer_title: "",
          address: "",
          plate_number: "",
          driver: "",
          ketone_body_weight: "",
          production_num: "",
          residual_duck: "",
          residual_weight: "",
          disabled: false,
          batch_title: "",
          batch: "",
        });
      } else {
        this.list1.push({
          // 抓鸭
          production_section_one_no: "",
          farmer_id: "",
          farmer_title: "",
          address: "",
          plate_number: "",
          scratch_num: "",
          macular_ulcer: "",
          broken_wing: "",
          palm: "",
          red_head: "",
          disabled: false,
          batch_title: "",
          batch: "",
        });
      }
    },
    //放苗
    getDetail() {
      this.$api({
        url: "/get_production_section_one_white_bar_detail",
        method: "get",
        data: {
          type: "1",
        },
      }).then((res) => {
        if (res.code === 200 && Object.keys(res.data).length > 0) {
          res.data.detail.forEach((item) => {
            item.disabled = false;
          });
          res.data.detail[0].disabled = true;
          this.list = res.data.detail;
          console.log("当前的数据--", this.list);
          this.editId = res.data.id;
          this.info1 = res.data.info;
          this.topFormObj.info = this.info1;
          this.topFormObj.production_date = res.data.production_date;
          this.topFormObj.train_number = res.data.train_number;
        }
      });
    },
    //养殖
    getDetail1() {
      this.$api({
        url: "/get_production_section_one_sideline_detail",
        method: "get",
        data: {
          type: "1",
        },
      }).then((res) => {
        if (res.code === 200 && Object.keys(res.data).length > 0) {
          res.data.detail.forEach((item) => {
            item.disabled = false;
          });
          res.data[0].detail.disabled = true;
          this.list1 = res.data.detail;
          this.editId1 = res.data.id;
          this.info2 = res.data.info;
          this.topFormObj.production_date = res.data.production_date;
          this.topFormObj.train_number = res.data.train_number;
        }
      });
    },
    exportInfo() {
      let obj = {
        type: this.timeIndex == null ? "" : this.timeIndex + 1,
        start_time: this.viewInfoQueryObj.start_time,
        end_time: this.viewInfoQueryObj.end_time,
        train_number: this.viewInfoQueryObj.train_number,
        form_type: this.navIndex + 4,
      };
      this.$store.dispatch("exportInfo", obj);
    },
    //点击数据跳转到详情页面
    goDetail(item) {
      if (item.pid > 0) {
        this.toRoute({
          path: "edit-record",
          query: {
            id: item.id,
            type: this.navIndex + 4, //1--放苗 2--养殖
            pid: true,
          },
        });
      } else {
        this.toRoute({
          path: "section-detail",
          query: {
            id: item.id,
            type: this.navIndex + 4, //1--放苗 2--养殖
          },
        });
      }
      this.isDetail = true;
    },
    loadMore() {
      if (this.nomore) return;
      this.page++;
      this.getViewData();
    },
    // 获取查看数据
    getViewData(flg = false) {
      // 1白条 2、抓鸭
      this.viewDataObj.page = flg
        ? this.viewDataObj.page++
        : (this.viewDataObj.page = 1);
      this.orders = [];
      if (this.navIndex == 1) {
        this.$api({
          url: "/get_production_section_one_white_bar_list",
          method: "get",
          data: this.viewDataObj,
        }).then((res) => {
          if (flg) {
            this.orders = this.orders.concat(res.data.list);
          } else {
            this.orders = res.data.list;
          }
          this.nomore =
            res.data.total / this.viewDataObj.limit > this.viewDataObj.page
              ? false
              : true;
          this.loadStatus = this.nomore ? "nomore" : "loading";
        });
      } else {
        this.$api({
          url: "/get_production_section_one_sideline_list",
          method: "get",
          data: this.viewDataObj,
        }).then((res) => {
          if (flg) {
            this.orders = this.orders.concat(res.data.list);
          } else {
            this.orders = res.data.list;
          }
          this.nomore =
            res.data.total / this.viewDataObj.limit > this.viewDataObj.page
              ? false
              : true;
          this.loadStatus = this.nomore ? "nomore" : "loading";
        });
      }
    },
    // 提交白条/抓鸭
    submitForm(is_draft = 0) {
      // 1白条 2抓鸭
      if (!this.topFormObj.production_date) {
        this.topFormObj.production_date = new Date()
          .toLocaleDateString()
          .replace(/\//g, "-");
      }
      if (is_draft != 1 && !this.topFormObj.train_number) {
        uni.showToast({
          title: "请输入车次信息",
          icon: "none",
        });
        return;
      }
      if (this.navIndex == 1) {
        const arr = ["farmer_title", "ketone_body_weight", "production_num"];
        const s = this.checkObjectsHaveValues(this.list, arr);
        if (!s && is_draft != 1) {
          uni.showToast({
            title: "请填写完整信息后再提交",
            icon: "none",
          });
          return;
        }
        // if (this.checkCondition()) {
        this.$api({
          url: "/save_production_section_one_white_bar",
          method: "post",
          data: {
            ...this.topFormObj,
            is_draft: is_draft,
            id: this.editId || "",
            details: JSON.stringify(this.list),
          },
        }).then((res) => {
          uni.showToast({
            title: res.msg,
            icon: "none",
          });
          if (res.code === 200 && is_draft != 1) {
            this.topFormObj.production_date = "";
            this.topFormObj.train_number = "";
            this.list.forEach((item) => {
              Object.keys(item).forEach((v) => (item[v] = ""));
            });
          }
        });
        // }
      } else {
        const arr = ["farmer_title", "scratch_num"];
        const s = this.checkObjectsHaveValues(this.list1, arr);
        if (!s && is_draft != 1) {
          uni.showToast({
            title: "请填写完整信息后再提交",
            icon: "none",
          });
          return;
        }
        // if (this.checkCondition()) {
        this.$api({
          url: "/save_production_section_one_sideline",
          method: "post",
          data: {
            ...this.topFormObj,
            is_draft: is_draft,
            id: this.editId1 || "",
            details: JSON.stringify(this.list1),
          },
        }).then((res) => {
          uni.showToast({
            title: res.msg,
            icon: "none",
          });
          if (res.code === 200 && is_draft != 1) {
            this.topFormObj.production_date = "";
            this.topFormObj.train_number = "";
            this.list1.forEach((item) => {
              Object.keys(item).forEach((v) => (item[v] = ""));
            });
          }
        });
        // }
      }
    },
    cartBack(val) {
      if (this.navIndex == 1) {
        this.list[this.commonIndex].plate_number = this.list[
          this.commonIndex
        ].plate_number.slice(
          0,
          this.list[this.commonIndex].plate_number.length - 1
        );
      } else {
        this.list1[this.commonIndex].plate_number = this.list1[
          this.commonIndex
        ].plate_number.slice(
          0,
          this.list1[this.commonIndex].plate_number.length - 1
        );
      }
    },
    cartChange(val) {
      // (val) => {
      if (this.navIndex == 1) {
        this.list[this.commonIndex].plate_number = this.list[
          this.commonIndex
        ].plate_number += val;
      } else {
        this.list1[this.commonIndex].plate_number = this.list1[
          this.commonIndex
        ].plate_number += val;
      }
      // }
    },
    checkObjectsHaveValues(list, k = []) {
      // 遍历list数组中的每个对象
      for (let i = 0; i < list.length; i++) {
        const obj = list[i];

        // 遍历对象中的每个字段
        for (let key in obj) {
          // 跳过production_section_five_no字段
          if (k.includes(key) && !obj[key]) {
            return false;
          }
        }
      }

      // 如果所有字段都有值，返回true
      return true;
    },
    // 判断必填项
    checkCondition() {
      let flag = true;
      // 判断必填项
      this.list.forEach((item) => {
        for (let key in item) {
          if (
            !item[key] &&
            key != "disabled" &&
            key != "production_section_one_no"
          ) {
            flag = false;
            console.log(key);
            return uni.showToast({
              title: "请填写完整信息后再提交",
              icon: "none",
            });
          }
        }
      });
      return flag;
    },
    getPlanNum() {
      this.$api({
        url: "/getFleetList",
        method: "get",
        data: {},
      }).then((res) => {
        console.log(res, "车队信息");
        if (res.code === 200) {
          this.farmerList4.push(res.data.plate_number);
          this.farmerList12 = res.data;
        }
      });
    },
    // 养殖户
    chooseFrame({ value }) {
      if (this.tabCurrent == 1) {
        if (this.saveIndex == 3) {
          this.viewInfoQueryObj.train_number = value[0].train_number;
        } else {
          //养殖户
          this.viewInfoQueryObj.farmer_id = value[0].value;
          this.viewInfoQueryObj.farmer_title = value[0].title;
        }
        if (this.btIndex == 1) {
          //白条数据统计
          this.getWhiteStateInfo();
        } else {
          //抓鸭副品
          this.getWorkShopInfo();
        }
      } else {
        if (this.navIndex == 1) {
          if (this.saveIndex == 0) {
            this.list[this.commonIndex].farmer_id = value[0].broker_id;
            this.list[this.commonIndex].farmer_title = value[0].title;
            this.list[this.commonIndex].address = value[0].address;
          } else if (this.saveIndex == 1) {
            this.list[this.commonIndex].batch = value[0].batch;
            this.list[this.commonIndex].batch_title = value[0].title;
          } else {
            //车队和队长
            this.list[this.commonIndex].plate_number = value[0].title;
            this.list[this.commonIndex].driver =
              this.farmerList12.captain_name.filter(
                (item) => item.title == value[0].title
              )[0].value;
          }
        } else {
          if (this.saveIndex == 0) {
            this.list1[this.commonIndex].farmer_id = value[0].broker_id;
            this.list1[this.commonIndex].farmer_title = value[0].title;
            this.list1[this.commonIndex].address = value[0].address;
          } else if (this.saveIndex == 4) {
            this.list1[this.commonIndex].plate_number = value[0].title;
          } else {
            this.list1[this.commonIndex].batch = value[0].batch;
            this.list1[this.commonIndex].batch_title = value[0].title;
          }
        }
      }
      this.frameShow = false;
    },
    // 选择地址
    chooseAddress(index) {
      this.commonIndex = index;
      this.toRoute("/select-address");
    },
    //白条和副品的选择框
    btCheck(k) {
      this.btIndex = k;
      this.btShow = false;
      this.getStateMentInfo();
    },

    //时间弹框
    timeBtn(e) {
      console.log("到达基地时间", e);
    },
    tabClick(e) {
      console.log("点击tab", e);
      this.tabCurrent = e.value;
      this.navIndex = 1;
      switch (e.value) {
        case 1:
          // 获取报表信息
          this.getStateMentInfo();
          // this.getFarmer1();
          break;
        case 2:
          this.loadStatus = "loadmore";
          // 获取查看数据
          this.getViewData();

          break;
      }
    },
    getStateMentInfo() {
      this.btIndex === 1 ? this.getWhiteStateInfo() : this.getWorkShopInfo();
    },
    getWorkShopInfo() {
      this.$api({
        url: "/get_production_section_one_sideline_detail_list",
        method: "get",
        data: {
          ...this.viewInfoQueryObj,
        },
      }).then((res) => {
        this.tableData = res.data.list;
        this.total = res.data.total;
        this.tableData[0].color = true;
        this.frameShow1 = false;
        this.column = [
          {
            name: "production_section_one_sideline_no",
            label: "序号",
            fixed: true,
            width: 120,
            align: "center",
            emptyString: "--",
          },
          {
            name: "farmer_title",
            label: "养殖户",
            sorter: false,
            align: "center",
          },
          {
            name: "address",
            label: "地点",
            sorter: false,
            align: "center",
          },
          {
            name: "plate_number",
            label: "车牌号",
            sorter: false,
            align: "center",
          },
          {
            name: "scratch_num",
            label: "抓伤只数",
            sorter: false,
            align: "center",
          },
          {
            name: "macular_ulcer",
            label: "斑疮",
            sorter: false,
            align: "center",
          },
          {
            name: "broken_wing",
            label: "断翅",
            sorter: false,
            align: "center",
          },
          {
            name: "palm",
            label: "断掌",
            sorter: false,
            align: "center",
          },
          {
            name: "red_head",
            label: "红头",
            sorter: false,
            align: "center",
          },
          {
            name: "status_text",
            label: "审核状态",
            sorter: false,
            align: "center",
          },
        ];
      });
    },
    getWhiteStateInfo() {
      this.$api({
        url: "/get_production_section_one_white_bar_detail_list",
        method: "get",
        data: {
          ...this.viewInfoQueryObj,
        },
      }).then((res) => {
        if (res.code === 200) {
          this.tableData = res.data.list;
          this.tableData[0].color = true;
          this.total = res.data.total;
          this.frameShow1 = false;
          this.column = [
            {
              name: "production_section_one_no",
              label: "序号",
              fixed: true,
              width: 120,
              align: "center",
              emptyString: "--",
            },
            {
              name: "farmer_title",
              label: "养殖户",
              sorter: false,
              align: "center",
            },
            {
              name: "address",
              label: "地点",
              sorter: false,
              align: "center",
            },
            {
              name: "plate_number",
              label: "车牌号",
              sorter: false,
              align: "center",
            },
            {
              name: "driver",
              label: "驾驶员",
              sorter: false,
              align: "center",
            },
            {
              name: "ketone_body_weight",
              label: "胴体重量",
              sorter: false,
              align: "center",
            },
            {
              name: "production_num",
              label: "生产只数",
              sorter: false,
              align: "center",
            },
            {
              name: "residual_duck",
              label: "残鸭只数",
              sorter: false,
              align: "center",
            },
            {
              name: "residual_weight",
              label: "残鸭重量",
              sorter: false,
              align: "center",
            },
            {
              name: "status_text",
              label: "审核状态",
              sorter: false,
              align: "center",
            },
          ];
        }
      });
    },
    //导航一
    navBtn(k) {
      this.navIndex = k;
      // if (this.tabCurrent == 0) {
      //   this.list = [];
      //   this.list.push(k == 1 ? this.whiteObj : this.workshop);
      // }
      if (k == 1) {
        this.topFormObj.info = this.info1;
      } else {
        this.topFormObj.info = this.info2;
      }
      if (this.tabCurrent == 2) {
        this.loadStatus = "loadmore";
        this.nomore = false;
        this.getViewData();
        //  this.getFarmer1();
      }
    },
    //查看列表的时间弹框选择
    tiemCheck({ k, data }) {
      console.log(k);
      this.viewInfoQueryObj.type = k + 1;
      this.topTime = data;
      this.showTime = false;
      this.getStateMentInfo();
    },
    //日历弹框
    confirm({ e, data, index }) {
      this.viewInfoQueryObj.start_time = e[0];
      this.viewInfoQueryObj.end_time = e[e.length - 1];
      this.topTime = data;
      this.viewInfoQueryObj.type = index + 1;
      this.getStateMentInfo();
      this.showTime = false;
    },
    getFarmer() {
      this.farmerList0 = [];
      this.$api({
        url: "/farmer_list",
        method: "get",
      }).then((res) => {
        if (res.code == 200) {
          this.farmerList0.push(res.data);
        }
      });
    },
    //点击分页事件
    pageBtn(e) {
      console.log(e);
      this.viewInfoQueryObj.page = e.current;
      this.getStateMentInfo();
    },
  },
};
</script>

<style lang="scss" scoped>
.transport {
  width: 100%;
  height: 100%;
  background: #f5f7f9;
  .bt15 {
    margin-top: 15px;
  }
  ::v-deep .u-tabs__wrapper__nav__item {
    flex: 1;
  }
  ::v-deep .u-popup {
    flex: 0 !important;
  }
  .header {
    height: 88upx;
    width: 100%;
    background: #fff;
  }
  .nav {
    padding: 20upx 0;
    & > view {
      width: 192rpx;
      height: 52rpx;
      text-align: center;
      line-height: 52upx;
      background: #ffffff;
      border-radius: 8rpx 8rpx 8rpx 8rpx;
      font-size: 24rpx;
      color: #9695a3;
      margin-right: 52upx;
    }
    .nav-ac {
      background: #da4334;
      color: #ffffff;
    }
  }
  .mb16 {
    margin-bottom: 16upx;
  }
  .tip {
    padding: 20upx 32upx;
    font-size: 24rpx;
    color: #a0a0a0;
  }
  .del {
    font-size: 24rpx;
    color: #da4334;
  }
  .add-icon {
    padding: 22upx 0;
    & > image {
      width: 40upx;
      height: 40upx;
    }
  }
  .wrap {
    background: #fff;
    padding: 0 32upx;

    .box {
      padding: 28upx 0;
      font-size: 32rpx;
      border-bottom: 1rpx solid #e4e4e4;
      & > view {
        font-size: 32rpx;
        color: #161616;
      }
      & > input {
        font-size: 32rpx;
        height: 28upx;
        margin-top: 28upx;
      }

      .box-b {
        margin-top: 28upx;
        & > input {
          height: 28upx;
          font-size: 32rpx;
        }
        & > image {
          width: 12upx;
          height: 21upx;
        }
      }
      ::-webkit-input-placeholder {
        color: #a0a0a0;
      }
    }

    .l-wrap {
      padding: 58upx 8upx 30upx 54upx;
      .l-box {
        position: relative;
        margin-bottom: 38upx;
        &-c {
          position: absolute;
          top: 0;
          left: -32upx;
          width: 16rpx;
          height: 16rpx;
          background: #d7d7d7;
          border-radius: 50%;
        }
        &-line {
          position: absolute;
          top: 28upx;
          left: -25upx;
          width: 2upx;
          height: 100upx;
          background: #d7d7d7;
        }
        &-title {
          font-size: 24rpx;
          color: #a0a0a0;
          & > view:nth-of-type(1) {
            font-size: 32rpx;
            color: #3d3d3d;
            margin-bottom: 12upx;
          }
        }
        &-r {
          &-t {
            font-size: 24rpx;
            color: #a0a0a0;
            & > image {
              width: 68rpx;
              height: 68rpx;
              margin-bottom: 8upx;
            }
          }
          .arrow {
            width: 32upx;
            height: 32upx;
            margin-left: 10upx;
            margin-right: 10upx;
            margin-top: 18upx;
          }
          &-add {
            width: 68rpx;
            height: 68rpx;
            background: #ffffff;
            border-radius: 12rpx 12rpx 12rpx 12rpx;
            border: 2rpx solid #ededed;
            & > image {
              width: 36upx;
              height: 36upx;
            }
          }
        }
      }
    }
  }
  .footer {
    background: #fff;
    padding: 8upx 32upx;

    padding-bottom: env(safe-area-inset-bottom);
    .box-icon {
      font-size: 24rpx;
      color: #000000;
      & > image {
        width: 39upx;
        height: 38upx;
        margin-bottom: 10upx;
      }
    }
    .btn {
      width: 580rpx;
      height: 80rpx;
      background: #da4334;
      border-radius: 422rpx 422rpx 422rpx 422rpx;
      border: 1rpx solid #dafbff;
      font-weight: 500;
      font-size: 28rpx;
      color: #ffffff;
      text-align: center;
      line-height: 80upx;
    }
  }
  .nav1 {
    height: 88rpx;
    background: #ffffff;
    font-size: 32rpx;
    color: #161616;
    box-sizing: border-box;
    padding: 0 32upx;
    .d-icon {
      width: 20rpx;
      height: 13rpx;
      margin-left: 18upx;
    }
    &-text {
      font-size: 28rpx;
      color: #da4334;
      margin-left: 6upx;
    }
    .e-icon {
      width: 28rpx;
      height: 28rpx;
    }
  }
  .time-box {
    padding: 30upx 32upx 16upx;
    font-size: 28rpx;
    color: #1c2127;
    .d1-icon {
      width: 12upx;
      height: 12upx;
      margin-left: 4upx;
    }
    &-text {
      font-size: 24rpx;
      color: #6f6e74;
      margin-top: 48upx;
    }
  }
  .wrap1 {
    background: #fff;
    padding: 28upx 32upx;
    font-size: 28rpx;
    color: #171717;
    &-num {
      font-size: 48rpx;
      padding: 48upx 0;
      border-bottom: 1rpx solid #e4e4e4;
    }
    &-des {
      font-size: 28rpx;
      color: #161616;
      margin: 28upx 0 26upx;
    }
    &-tip {
      font-size: 24rpx;
      color: #161616;
      margin-bottom: 20upx;
      .d {
        width: 12rpx;
        height: 8rpx;
        margin-left: 12upx;
      }
    }
    &-text {
      height: 28rpx;
      width: 80upx;
      text-align: center;
      line-height: 28upx;
      border-bottom: 1upx solid #000;
    }
    .ml76 {
      margin-left: 76upx;
    }
  }
  .popup-wrap {
    padding: 34upx 32upx 0;
    width: 100%;
    box-sizing: border-box;
    .pop-header {
      position: relative;
      font-weight: bold;
      text-align: center;
      font-size: 28rpx;
      color: #181818;
      margin-bottom: 50upx;
      & > image {
        position: absolute;
        width: 32upx;
        height: 32upx;
        left: 30upx;
        top: 50%;
        transform: translateY(-50%);
      }
    }
    .popup-box {
      flex-wrap: wrap;
      margin-bottom: 200upx;
      & > view {
        width: 320rpx;
        height: 76rpx;
        background: #ffffff;
        border-radius: 12rpx 12rpx 12rpx 12rpx;
        border: 2rpx solid #eaeaea;
        text-align: center;
        line-height: 76upx;
        font-size: 26rpx;
        color: #171717;
        margin-bottom: 20upx;
      }
      .time-ac {
        border: 2rpx solid #da4334;
        color: #da4334;
      }
    }
  }
  .search {
    width: 702rpx;
    height: 68rpx;
    background: #ffffff;
    border-radius: 12rpx 12rpx 12rpx 12rpx;
    border: 2rpx solid rgba(0, 0, 0, 0.06);
    margin: 0 auto 20upx;
    box-sizing: border-box;
    padding: 0 20upx;
    font-size: 28rpx;
    & > image {
      width: 32upx;
      height: 32upx;
      margin-right: 16upx;
    }
  }
  .content-wrap {
    padding: 0 24upx;
    .content-box {
      padding: 32upx 32upx 28upx;
      background: #fff;
      margin-bottom: 20upx;
      font-size: 24rpx;
      color: #8d8d8d;
      .t {
        font-size: 32rpx;
        color: #171717;
      }
      .t1 {
        color: #afafaf;
      }
      .no {
        margin-bottom: 12upx;
        color: #8d8d8d;
      }
      .edit-text {
        width: 78rpx;
        height: 36rpx;
        background: #f17303;
        font-size: 24rpx;
        color: #ffffff;
        border-radius: 14upx 0 14upx 0;
        margin-left: 16upx;
        text-align: center;
        line-height: 36upx;
      }

      .cred {
        font-size: 24rpx;
        color: #da4334;
      }
      .t2 {
        color: #8d8d8d;
        margin-bottom: 12rpx;
      }
      .mb12 {
        margin-bottom: 12upx;
      }
      .ac {
        font-size: 26rpx;
        color: #8d8d8d;
      }
      .ac1 {
        font-size: 26rpx;
        color: #171717;
      }
      .img {
        width: 40upx;
        height: 40upx;
        margin-right: 8upx;
      }
      .ac2 {
        font-size: 26rpx;
        color: #f17303;
      }
      .ac3 {
        font-size: 26rpx;
        color: #0cb18e;
      }
      .ac4 {
        font-size: 26rpx;
        color: #8d8d8d;
      }
      .mt34 {
        margin-top: 34upx;
      }
    }
  }
  .popup-bt {
    & > view {
      padding: 40upx 0 38upx;
      text-align: center;
      font-size: 28rpx;
      color: #000000;
    }
    &-b {
      border-bottom: 1upx solid #f4f8fa;
    }
    &-b16 {
      border-bottom: 16upx solid #f4f8fa;
    }
    .bt-ac {
      color: #da4334;
    }
  }
  .sc {
    color: #da4334;
  }
}
</style>
